home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2005 October / PCWOCT05.iso / Software / FromTheMag / XAMPP 1.4.14 / xampp-win32-1.4.14-installer.exe / xampp / php / pear / Auth / Container / vpopmail.php < prev   
PHP Script  |  2004-03-24  |  2KB  |  67 lines

  1. <?PHP
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4                                                        |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2003 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.02 of the PHP license,      |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Author: Stanislav Grozev <tacho@orbitel.bg>                          |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: vpopmail.php,v 1.3 2003/09/08 11:24:05 yavo Exp $
  20. //
  21.  
  22. require_once "Auth/Container.php";
  23.  
  24. /**
  25.  * Storage driver for fetching login data from vpopmail
  26.  *
  27.  * @author   Stanislav Grozev <tacho@orbitel.bg>
  28.  * @package  Auth
  29.  * @version  $Revision: 1.3 $
  30.  */
  31. class Auth_Container_vpopmail extends Auth_Container {
  32.  
  33.     // {{{ Constructor
  34.  
  35.     /**
  36.      * Constructor of the container class
  37.      *
  38.      * @return integer Always returns 1.
  39.      */
  40.     function Auth_Container_vpopmail()
  41.     {
  42.         return 1;
  43.     }
  44.  
  45.     // }}}
  46.     // {{{ fetchData()
  47.  
  48.     /**
  49.      * Get user information from vpopmail
  50.      *
  51.      * @param   string Username - has to be valid email address
  52.      * @param   string Password
  53.      * @return  boolean
  54.      */
  55.     function fetchData($username, $password)
  56.     {
  57.         $userdata = array();
  58.         $userdata = preg_split("/@/", $username, 2);
  59.         $result = @vpopmail_auth_user($userdata[0], $userdata[1], $password);
  60.  
  61.         return $result;
  62.     }
  63.  
  64.     // }}}
  65. }
  66. ?>
  67.